<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: TensorAllocator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1_tensor_allocator.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">TensorAllocator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Basic implementation of a CPU memory tensor allocator.  
 <a href="classarm__compute_1_1_tensor_allocator.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for TensorAllocator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_tensor_allocator__coll__graph.svg" width="134" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a20c11f37f59a434b1dd0b69f62771ac6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a20c11f37f59a434b1dd0b69f62771ac6">TensorAllocator</a> (<a class="el" href="classarm__compute_1_1_tensor.xhtml">Tensor</a> *owner=nullptr)</td></tr>
<tr class="memdesc:a20c11f37f59a434b1dd0b69f62771ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a20c11f37f59a434b1dd0b69f62771ac6">More...</a><br /></td></tr>
<tr class="separator:a20c11f37f59a434b1dd0b69f62771ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27f8b115e4571d52d83419aaea4eeee1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a27f8b115e4571d52d83419aaea4eeee1">~TensorAllocator</a> ()</td></tr>
<tr class="memdesc:a27f8b115e4571d52d83419aaea4eeee1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="#a27f8b115e4571d52d83419aaea4eeee1">More...</a><br /></td></tr>
<tr class="separator:a27f8b115e4571d52d83419aaea4eeee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f7d6251f7bd7834128664d851986e6a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a1f7d6251f7bd7834128664d851986e6a">TensorAllocator</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;)=delete</td></tr>
<tr class="memdesc:a1f7d6251f7bd7834128664d851986e6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers).  <a href="#a1f7d6251f7bd7834128664d851986e6a">More...</a><br /></td></tr>
<tr class="separator:a1f7d6251f7bd7834128664d851986e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a943854ce6f3aafac2714340e0915de75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a943854ce6f3aafac2714340e0915de75">operator=</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;)=delete</td></tr>
<tr class="memdesc:a943854ce6f3aafac2714340e0915de75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copy assigned (As this class contains pointers).  <a href="#a943854ce6f3aafac2714340e0915de75">More...</a><br /></td></tr>
<tr class="separator:a943854ce6f3aafac2714340e0915de75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#aa5d534fb1ab7a62ef81d80f47af1679b">TensorAllocator</a> (<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved.  <a href="#aa5d534fb1ab7a62ef81d80f47af1679b">More...</a><br /></td></tr>
<tr class="separator:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35f0c4ca4ed0f781203e38f979ef1351"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a35f0c4ca4ed0f781203e38f979ef1351">operator=</a> (<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:a35f0c4ca4ed0f781203e38f979ef1351"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved.  <a href="#a35f0c4ca4ed0f781203e38f979ef1351">More...</a><br /></td></tr>
<tr class="separator:a35f0c4ca4ed0f781203e38f979ef1351"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3014ce2f4215e8a44331aa5daf3ba0d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a3014ce2f4215e8a44331aa5daf3ba0d4">init</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;allocator, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;coords, <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> sub_info)</td></tr>
<tr class="memdesc:a3014ce2f4215e8a44331aa5daf3ba0d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shares the same backing memory with another tensor allocator, while the tensor info might be different.  <a href="#a3014ce2f4215e8a44331aa5daf3ba0d4">More...</a><br /></td></tr>
<tr class="separator:a3014ce2f4215e8a44331aa5daf3ba0d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a738d0f4e90cfddb07316f368a855e50b"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a738d0f4e90cfddb07316f368a855e50b">data</a> () const </td></tr>
<tr class="memdesc:a738d0f4e90cfddb07316f368a855e50b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pointer to the allocated data.  <a href="#a738d0f4e90cfddb07316f368a855e50b">More...</a><br /></td></tr>
<tr class="separator:a738d0f4e90cfddb07316f368a855e50b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e509c2a177b0b29e9e2369535094dee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a6e509c2a177b0b29e9e2369535094dee">allocate</a> () override</td></tr>
<tr class="memdesc:a6e509c2a177b0b29e9e2369535094dee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate size specified by <a class="el" href="classarm__compute_1_1_tensor_info.xhtml" title="Store the tensor&#39;s metadata. ">TensorInfo</a> of CPU memory.  <a href="#a6e509c2a177b0b29e9e2369535094dee">More...</a><br /></td></tr>
<tr class="separator:a6e509c2a177b0b29e9e2369535094dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a1468b0adb6ec3f9d38aa7d60b8a91974">free</a> () override</td></tr>
<tr class="memdesc:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free allocated CPU memory.  <a href="#a1468b0adb6ec3f9d38aa7d60b8a91974">More...</a><br /></td></tr>
<tr class="separator:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1100744b8850c28ee06092d65dcf95d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_status.xhtml">arm_compute::Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a1100744b8850c28ee06092d65dcf95d0">import_memory</a> (<a class="el" href="classarm__compute_1_1_memory.xhtml">Memory</a> memory)</td></tr>
<tr class="memdesc:a1100744b8850c28ee06092d65dcf95d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an existing memory as a tensor's backing memory.  <a href="#a1100744b8850c28ee06092d65dcf95d0">More...</a><br /></td></tr>
<tr class="separator:a1100744b8850c28ee06092d65dcf95d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89ee265e94df4e8aaf4f465649d4e065"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a89ee265e94df4e8aaf4f465649d4e065">set_associated_memory_group</a> (<a class="el" href="namespacearm__compute.xhtml#a0e7a03e2e133cb1fbb12517a3f646a09">MemoryGroup</a> *associated_memory_group)</td></tr>
<tr class="memdesc:a89ee265e94df4e8aaf4f465649d4e065"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates the tensor with a memory group.  <a href="#a89ee265e94df4e8aaf4f465649d4e065">More...</a><br /></td></tr>
<tr class="separator:a89ee265e94df4e8aaf4f465649d4e065"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1_i_tensor_allocator"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_tensor_allocator')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a></td></tr>
<tr class="memitem:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#af97d553d2aa86688c92db8ed9a67cf0e">ITensorAllocator</a> ()</td></tr>
<tr class="memdesc:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#af97d553d2aa86688c92db8ed9a67cf0e">More...</a><br /></td></tr>
<tr class="separator:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#ae82acbc677aa7d77c6a3f5e3547ef917">ITensorAllocator</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;)=default</td></tr>
<tr class="memdesc:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be copy constructed.  <a href="#ae82acbc677aa7d77c6a3f5e3547ef917">More...</a><br /></td></tr>
<tr class="separator:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">operator=</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;)=default</td></tr>
<tr class="memdesc:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be copied.  <a href="#a12e5f2915e2461321b130dcf84f3e268">More...</a><br /></td></tr>
<tr class="separator:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a4fe09d257ff33e01defc7074ca22dc98">ITensorAllocator</a> (<a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be move constructed.  <a href="#a4fe09d257ff33e01defc7074ca22dc98">More...</a><br /></td></tr>
<tr class="separator:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a46277b6e964a66a9936e06f9989f0ff6">operator=</a> (<a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved.  <a href="#a46277b6e964a66a9936e06f9989f0ff6">More...</a><br /></td></tr>
<tr class="separator:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a8378fc6c887231765b885f8033c7bb99">~ITensorAllocator</a> ()=default</td></tr>
<tr class="memdesc:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default virtual destructor.  <a href="#a8378fc6c887231765b885f8033c7bb99">More...</a><br /></td></tr>
<tr class="separator:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa72161e0e3c0f6b2da20f835de6af680 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa72161e0e3c0f6b2da20f835de6af680">init</a> (const <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;input)</td></tr>
<tr class="memdesc:aa72161e0e3c0f6b2da20f835de6af680 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tensor based on the passed <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>.  <a href="#aa72161e0e3c0f6b2da20f835de6af680">More...</a><br /></td></tr>
<tr class="separator:aa72161e0e3c0f6b2da20f835de6af680 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b12680d0e794d5e81f489df22b38231 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a2b12680d0e794d5e81f489df22b38231">info</a> ()</td></tr>
<tr class="memdesc:a2b12680d0e794d5e81f489df22b38231 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a reference to the tensor's metadata.  <a href="#a2b12680d0e794d5e81f489df22b38231">More...</a><br /></td></tr>
<tr class="separator:a2b12680d0e794d5e81f489df22b38231 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad129de4883c35830834987e9b68314e1 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#ad129de4883c35830834987e9b68314e1">info</a> () const </td></tr>
<tr class="memdesc:ad129de4883c35830834987e9b68314e1 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a constant reference to the tensor's metadata.  <a href="#ad129de4883c35830834987e9b68314e1">More...</a><br /></td></tr>
<tr class="separator:ad129de4883c35830834987e9b68314e1 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Basic implementation of a CPU memory tensor allocator. </p>

<p>Definition at line <a class="el" href="_tensor_allocator_8h_source.xhtml#l00044">44</a> of file <a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a20c11f37f59a434b1dd0b69f62771ac6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor.xhtml">Tensor</a> *&#160;</td>
          <td class="paramname"><em>owner</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="a27f8b115e4571d52d83419aaea4eeee1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default destructor. </p>

</div>
</div>
<a class="anchor" id="a1f7d6251f7bd7834128664d851986e6a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prevent instances of this class from being copied (As this class contains pointers). </p>

</div>
</div>
<a class="anchor" id="aa5d534fb1ab7a62ef81d80f47af1679b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allow instances of this class to be moved. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6e509c2a177b0b29e9e2369535094dee"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void allocate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allocate size specified by <a class="el" href="classarm__compute_1_1_tensor_info.xhtml" title="Store the tensor&#39;s metadata. ">TensorInfo</a> of CPU memory. </p>
<dl class="section note"><dt>Note</dt><dd>The tensor must not already be allocated when calling this function. </dd></dl>

<p>Implements <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">ITensorAllocator</a>.</p>

</div>
</div>
<a class="anchor" id="a738d0f4e90cfddb07316f368a855e50b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* data </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the pointer to the allocated data. </p>

</div>
</div>
<a class="anchor" id="a1468b0adb6ec3f9d38aa7d60b8a91974"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void free </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Free allocated CPU memory. </p>
<dl class="section note"><dt>Note</dt><dd>The tensor must have been allocated when calling this function. </dd></dl>

<p>Implements <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a1781eecaabd2bc97d074437d01b2c683">ITensorAllocator</a>.</p>

</div>
</div>
<a class="anchor" id="a1100744b8850c28ee06092d65dcf95d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_status.xhtml">arm_compute::Status</a> import_memory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_memory.xhtml">Memory</a>&#160;</td>
          <td class="paramname"><em>memory</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an existing memory as a tensor's backing memory. </p>
<dl class="section warning"><dt>Warning</dt><dd>If the tensor is flagged to be managed by a memory manager, this call will lead to an error. </dd>
<dd>
Ownership of memory depends on the way the <a class="el" href="classarm__compute_1_1_memory.xhtml">Memory</a> object was constructed </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Calling free on a tensor with imported memory will just clear the internal pointer value.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">memory</td><td><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object. ">Memory</a> to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>error status </dd></dl>

</div>
</div>
<a class="anchor" id="a3014ce2f4215e8a44331aa5daf3ba0d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
          <td class="paramname"><em>coords</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td>
          <td class="paramname"><em>sub_info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Shares the same backing memory with another tensor allocator, while the tensor info might be different. </p>
<p>In other words this can be used to create a sub-tensor from another tensor while sharing the same memory.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml" title="Basic implementation of a CPU memory tensor allocator. ">TensorAllocator</a> have to be of the same specialized type.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator that owns the backing memory to be shared. Ownership becomes shared afterwards. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td>The starting coordinates of the new tensor inside the parent tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sub_info</td><td>The new tensor information (e.g. shape etc) </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="_tensor_allocator_8cpp_source.xhtml#l00042">arm_compute::test::validation::TEST_CASE()</a>.</p>

</div>
</div>
<a class="anchor" id="a943854ce6f3aafac2714340e0915de75"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a>&amp; operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prevent instances of this class from being copy assigned (As this class contains pointers). </p>

</div>
</div>
<a class="anchor" id="a35f0c4ca4ed0f781203e38f979ef1351"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a>&amp; operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allow instances of this class to be moved. </p>

</div>
</div>
<a class="anchor" id="a89ee265e94df4e8aaf4f465649d4e065"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_associated_memory_group </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a0e7a03e2e133cb1fbb12517a3f646a09">MemoryGroup</a> *&#160;</td>
          <td class="paramname"><em>associated_memory_group</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates the tensor with a memory group. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">associated_memory_group</td><td><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object. ">Memory</a> group to associate the tensor with </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>arm_compute/runtime/<a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:37:59 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
